package lab02.test21;

import java.util.Scanner;
public class Test_21 {
    public static void main(String[] args) {


        Scanner sc=new Scanner(System.in);
        System.out.println("输入字符串：");
        String str=sc.nextLine();

        char [] arr=str.toCharArray();
        int count=0;

        for (int i=0;i<arr.length;i++){
            if (arr[i]=='j')
                count++;
        }
        System.out.println("字符j出现的频率为"+count+"次");
    }
}
